package com.testmanager.testmananger.zyyc.interTest.constant;

import com.testmanager.testmananger.foundation.domain.enums.EnumBase;

import java.util.Arrays;

/**
 * @author hesencun
 * @date: 2021/6/30 11:11 AM
 */
public enum  YCProjectStatus implements EnumBase {
    EXCETE("执行中,可重复执行",1),
    EXCUTE("执行中，不可重复执行",2),
    NORMAL("未执行",3);


    private final String name;
    private final Integer value;

    YCProjectStatus(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    public static YCProjectStatus getValueOf(Integer value){

        return Arrays.stream(YCProjectStatus.values())
                .filter(t->t.getValue().equals(value))
                .findFirst()
                .orElse(YCProjectStatus.NORMAL);
    }

}
